import http from '../http'

//下拉框数据渲染 
export const downRenderApi=()=>http({
    url:"/storehouse/outDropDownlist",
    method:"post",
})
// 编辑数据渲染
export const editApi=(id)=>http({
    url:"",
    method:"post",
    params:{
        id
    }
})

// 搜索商品
export const goodsRenderApi=(limit,size)=>http({
    url:"/storehouse/outStoragelist",
    method:"post",
    params:{limit,size}
})

// 根据条件搜索商品
export const searchApi=(goodsName,page,size)=>http({
    url:"/storehouse/outLike",
    method:"post",
    params:{goodsName,page,size}
})

// 添加商品
export const addApi=(id,outId)=>http({
    url:"/storehouse/addGoods",
    method:"post",
    params:{id,outId}
})


// 添加完商品之后渲染商品
export const renderAddApi=(orderId)=>http({
    url:"/storehouse/selectByGoodsXq",
    method:"post",
    params:{orderId}
})

// 增减
export const increaseDApi=(bigCount,id,smallCount)=>http({
    url:"/storehouse/updateByPrice",
    method:"post",
    params:{bigCount,id,smallCount}
})

// 删除
export const deleteListApi=(id)=>http({
    url:"/storehouse/deleteStore",
    method:"post",
    params:{id}
})


// 提交新的

export const submitNewApi = (amount,depot,id,oName,payType,uName) => http({
    url:"",
    method:"post",
    params: {
        amount,depot,id,oName,payType,uName
    }
})

// 提交编辑的
export const submitEditApi = (amount,depot,id,oName,payType,uName) => http({
    url:"/storehouse/addOutList",
    method:"post",
    params: {
        amount,depot,id,oName,payType,uName
    }
})

